Directory Cache

About

This tab allows you to define settings for your mail database. This database is used to keep information about email boxes - their sizes, numbers of messages, etc. Data are recounted after each change (except for e.g.: copying emails manually within a file manager - in this case you can use the Run Now button).

As access to a drive where the database is kept can take some time, it is convenient to have this database in cache memory.

To reveal separate logs for directory cache, proceed to Status > Logs and select the Directory Cache item from the Log list.

Figure. Advanced management: Directory Cache tab.

General and Indexed Directories Sections

Field

Description

DB Settings

Click the button to open the standard Database dialog where you can define and maintain the database settings.

For more information, refer to Database Settings .

Schedule

Click the button to define how often the database content is to be refreshed. The standard Schedule dialog opens.

For more information, refer to Schedule.

Next run – this label informs you when the next database contents refresh will be performed. If a schedule is not set, the label reads "unscheduled".

Run Now

You may want to recalculate database data immediately (e.g.: after copying some messages manually using a file manager). Click the button.

Indexed Directories

Indexed directories are shown here. These are mail and archive directories (default or as set on the appropriate places – System > Storage > Directories, Mail > Archive).

Not editable here.

Note: The externaldirs.dat file has to be used to list non-standard mailbox paths. (For more information, refer to Folder section in Domains and Accounts > Management > Domains > Folder.) All mailbox paths included in this file are also automatically listed in this field.

Journal Section

The Journal field contains the last 10 rows from the directory cache database.

Each row contains these values:

  • Start time of DC update run
  • End time of DC update run (empty if update is running)
  • Running time – how long the update proceeded
  • Base directory – DC update base directory
  • Status – OK" or Fail.

The field can be refreshed by pressing F5.

Directory Cache Moved to Database

Disk based directory cache (subdirs.dat, size.dat in user's mailboxes) has been removed in 10.4. When using file system account storage, after upgrade an SQLite database is created to which the directory indices and sizes will be written. When using database account storage, the same database engine will be used to create the directory cache. While the DB is empty, the directories are indexed on demand, whenever requested by server (e.g. IMAP folder list).

Cache is updated continuously as new items are added or changed (Live Update). Additionally, each Friday before midnight (but this can be scheduled to custom time), the /mail and /archive folders are traversed and directory indices and sizes are updated (Wave Mode) on the background.

Note that files/folders copied into mailboxes will not appear to users unless the directory cache is updated. An update should then be forced per user (Management > Options > Refresh Directory Cache) rather than globally via the System > Advanced > Directory Cache > Run Now button. If the files are copied using the built-in File Manager, the cache index is rebuilt automatically (and also imapindex.dat files are updated for any files copied).

Note: In the case you need to know when directory cache refresh started and ended, go to the directory cache log (Status > Logs). You will see something similar to this:

control.exe [1118] 10:48:45 Directory cache - Start count=1 sleep=5 c:\IceWarp\mail\ testes.icewarp.com.br\flavio\

control.exe [1118] 10:48:52 Directory cache - End

The default directory cache database should be changed to MySQL for large installations, and the full index built after upgrade using the Run Now button. This can take many hours since the indexing runs with a very low priority but will not affect server operation beside some slowdowns when the directory information is requested for the first time.

Directory Cache Wave Mode, Direct Mode Removed

The former modes for directory cache indexing (Wave Mode where cache was built on background and the Direct Mode which did not employ the cache) were removed and now directory cache is always in database, always updated on the fly (Live Update) and additionally indexed on the background (Wave Mode) without possibility to change it.

You may want to stop directory cache wave processing – e.g.: because it is not set properly. Set the c_accounts_global_accounts_directorycache_wavestopped API variable to 1 (one). (Server console > File > API console – search for the variable.)